/* CSS สำหรับ Dashboard */
        :root {
            --sidebar-width: 280px;
            --sidebar-collapsed-width: 80px; /* ความกว้างของ Sidebar เมื่อถูกยุบ */
        }

        /* Wrapper หลักที่รวม Sidebar และเนื้อหาหลัก */
        #wrapper {
            display: flex;
            transition: all 0.3s ease-in-out;
            position: relative;
            min-height: 100vh; /* เพิ่ม min-height */
            overflow-x: hidden; /* ป้องกันการเลื่อนแนวนอน */
        }

        /* Sidebar Styling */
        #sidebar-wrapper {
            background-color: #343a40; /* สีพื้นหลัง Sidebar */
            color: #adb5bd;
            min-width: var(--sidebar-width);
            max-width: var(--sidebar-width);
            transition: all 0.3s ease-in-out;
            flex-shrink: 0;
            position: sticky;
            top: 0;
            height: 100vh;
            overflow: hidden; /* ซ่อนส่วนที่เกินจากความกว้าง */
            z-index: 1030; /* ให้ Sidebar อยู่ด้านหน้า */
        }

        /* Main Content Styling */
        #page-content-wrapper {
            width: 100%;
            padding: 20px;
            transition: all 0.3s ease-in-out;
        }

        /* Sidebar Collapse State (สำหรับหน้าจอขนาดใหญ่) */
        @media (min-width: 769px) {
            .sidebar-collapsed #sidebar-wrapper {
                min-width: var(--sidebar-collapsed-width);
                max-width: var(--sidebar-collapsed-width);
            }

            .sidebar-collapsed .sidebar-text,
            .sidebar-collapsed h4.sidebar-title {
                display: none; /* ซ่อนข้อความและหัวข้อเมื่อยุบ */
            }

            .sidebar-collapsed .sidebar-collapsed-logo {
                display: block !important; /* แสดงไอคอนโลโก้เมื่อถูกยุบ */
            }

            .sidebar-collapsed .sidebar-item a {
                padding: 10px 0;
                text-align: center;
            }

            .sidebar-collapsed .sidebar-item a i {
                margin-right: 0 !important;
            }
        }
        
        /* สไตล์สำหรับลิงก์เมนูใน Sidebar */
        .sidebar-item a {
            color: #adb5bd;
            text-decoration: none;
            padding: 10px 15px;
            display: block;
            border-radius: 5px;
            white-space: nowrap;
        }
        .sidebar-item a:hover {
            background-color: #495057;
            color: #fff;
        }
        .sidebar-item a.active {
            background-color: #0d6efd;
            color: #fff;
        }

        /* Media Query สำหรับหน้าจอขนาดเล็ก (เช่นโทรศัพท์) */
        @media (max-width: 768px) {
            #sidebar-wrapper {
                position: fixed;
                z-index: 1030;
                top: 0;
                bottom: 0;
                left: calc(-1 * var(--sidebar-width)); /* ซ่อน Sidebar เริ่มต้น */
                transform: translateX(0); /* แก้ไขเพื่อให้ CSS transition ทำงาน */
                box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
            }

            .sidebar-toggled #sidebar-wrapper {
                left: 0; /* แสดง Sidebar เมื่อถูกเปิด */
                transform: translateX(0);
            }

            .sidebar-toggled #page-content-wrapper {
                transform: translateX(var(--sidebar-width));
            }
            
            /* Overlay สำหรับหน้าจอมือถือเมื่อ Sidebar เปิดอยู่ */
            #overlay {
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: rgba(0, 0, 0, 0.5);
                z-index: 1020;
                display: none;
                cursor: pointer;
            }
            .sidebar-toggled #overlay {
                display: block;
            }
        }
/* CSS สำหรับ Skeleton Screen */
.skeleton-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
}
.skeleton-card {
    width: 250px;
    height: 100px;
    background-color: #f0f0f0;
    border-radius: 8px;
    padding: 10px;
    animation: pulse 1.5s infinite ease-in-out;
}
.skeleton-line {
    height: 15px;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 8px;
}
.skeleton-line.title {
    width: 60%;
}
.skeleton-chart {
    width: 100%;
    height: 250px;
    background-color: #f0f0f0;
    border-radius: 8px;
    animation: pulse 1.5s infinite ease-in-out;
}
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/*Canvas Graph Height*/
#monthlySalesChart{
    height: 240px !important; 
    max-height: 240px !important;
}
#userRatioChart{
    height: 472px !important; 
    max-height: 472px !important;
}

    /* Custom styles for the registration form */
    .register-container {
        padding: 2rem;
    }

    .form-heading {
        background-color: #0d6efd;
        color: #fff;
        padding: 1rem;
        text-align: center;
        border-radius: 0.5rem 0.5rem 0 0;
        margin-bottom: 2rem;
    }
    
    .form-content {
        padding: 1rem 0;
    }

    /* Styles for the input to show only the bottom border */
    .form-control {
        border: none;
        border-bottom: 2px solid #0d6efd; /* Changed to match button color */
        border-radius: 0;
        background-color: transparent;
        padding-left: 0;
        transition: border-color 0.3s ease-in-out;
    }

    .form-control:focus {
        border-color: #0a58ca;
        box-shadow: none;
    }
    
    /* Adjust the width for the select dropdown */
    .form-select {
        max-width: 300px;
    }

    /* Center the button */
    .text-center {
        text-align: center;
    }
    
    /* Responsive adjustments */
    @media (min-width: 768px) {
        .register-container {
            max-width: 800px;
            margin: auto;
        }
    }

/* Custom styles for the footer */
.footer {
    background-color: #343a40; /* Dark background color */
    color: #f8f9fa; /* Light text color */
    padding: 1rem 0;
    text-align: center;
    /*border-top: 5px solid #0d6efd; /* Blue border on top */
    margin-top: auto; /* Push the footer to the bottom of the page */
}

/* Style for social icons or links inside the footer */
.footer a {
    color: #f8f9fa;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

/* Change link color on hover */
.footer a:hover {
    color: #0d6efd; 
}

/* Style for social icon font size and spacing */
.footer-social-icons a {
    font-size: 1.5rem;
    margin: 0 10px;
}
/* ใส่ใน index.php */
#chartModal {
    display: none; /* ปิดไว้ก่อน */
    position: fixed; /* ใช้ fixed เพื่อให้อิงกับหน้าจอ Browser */
    z-index: 9999; /* ให้ลอยทับ Sidebar/Navbar */
    left: 0;
    top: 0;
    width: 100vw; /* เต็มความกว้างจอ */
    height: 100vh; /* เต็มความสูงจอ */
    background-color: rgba(0, 0, 0, 0.7); /* พื้นหลังดำโปร่งแสง */
    
    /* บรรทัดสำคัญที่ทำให้ลูก (modal-content) อยู่กลางจอ */
    align-items: center; 
    justify-content: center;
}

#chartModal .modal-content {
    background-color: #fff;
    padding: 25px;
    border-radius: 15px;
    width: 90%;
    max-width: 750px;
    position: relative;
    margin: 0 !important; /* ลบ margin: 10% auto ของเก่าออกให้หมด */
    box-shadow: 0 5px 30px rgba(0,0,0,0.5);
}
.donut-card { 
    background: #ffffff; 
    padding: 2px; 
    border-radius: 30px; 
    width: 200px; 
    text-align: center; 
    color: #1e293b; 
    font-family: 'Segoe UI', Tahoma, sans-serif;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
    margin: auto;
}
.donut-container { 
    position: relative; 
    width: 100%;
    aspect-ratio: 1; 
    margin-bottom: 15px; 
}
.center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    text-align: center;
    width: 100%;
}
#totalCount { 
    font-size: 2.5rem; 
    font-weight: 800; 
    line-height: 1;
    display: block;
}
#labelTitle {
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    display: block;
}
#apCount { 
    font-size: 2.5rem; 
    font-weight: 800; 
    line-height: 1;
    display: block;
}
#apLabel {
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    display: block;
}
.donut-label { 
    font-size: 0.75rem; 
    color: #94a3b8;
    font-weight: 600;
    margin-top: 15px;
}
.indicators-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px; /* ระยะห่างระหว่างแถบ */
    margin: 20px auto;
    width: 25%; /* กำหนดความกว้างรวมของกลุ่ม indicator */
}

.dot-button {
    height: 8px; /* ความหนาของแถบ */
    border-radius: 10px; /* ทำให้ปลายมน */
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 0;
    min-width: 10px; /* ขนาดขั้นต่ำกรณีค่าเป็น 0 */
}

.dot-active {
    box-shadow: 0 0 12px rgba(0,0,0,0.15);
    height: 12px; /* ให้แถบที่เลือกดูเด่นขึ้น */
    opacity: 1;
}

.dot-inactive {
    opacity: 0.4;
}

.model-count-badge {
    background-color: #9e9e9e; /* สีเทา */
    color: white;
    padding: 2px 12px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: bold;
    display: inline-block;
}